import java.util.Arrays;

/**
 * Created with Intellij IDEA.
 * Description;
 * User:墨琦
 * Data:2023-03-28
 * Time:19:06
 */
public class Text1 {
    public static void main(String[] args) {
        String name="Hello World,my name is 汤琦";
        int count=0;
        for(String s:name.split(" "))
        {
            if(s.length()!=0)
            {
                count++;
            }
        }
        System.out.println(count);

    }
}
